const mongoose=require('mongoose');
const merchantsModel=mongoose.model('merchantsModel');
module.exports.repeat=async function(usernanme){
    const data=await merchantsModel.find(usernanme);
    return data;
}
module.exports.add=async function(user){
    const data=await merchantsModel.create(user);
    return data;
}
module.exports.login=async function(user){
    console.log(user);
    const data=await merchantsModel.find({username:user.login_username,pass:user.login_pass});
    console.log(data);
    return data;
}